package com.aaa.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author C-Q
 * @version 1.1.0
 * @Description: TODO
 * @date 2023/1/3
 */
@RestController
@RequestMapping("user")
public class UserController {
    @GetMapping("delete")
    @PreAuthorize(value = "hasAuthority('user:delete')")
    public String delete() {
        return "用户删除的操作";
    }
    @GetMapping("add")
    @PreAuthorize(value = "hasAuthority('user:add')")
    public String add() {
        return "用户添加的操作";
    }
    @GetMapping("update")
    @PreAuthorize(value = "hasAuthority('user:update')")
    public String update() {
        return "用户修改的操作";
    }
    @GetMapping("query")
    @PreAuthorize(value = "hasAuthority('user:query')")
    public String query() {
        return "用户查询的操作";
    }
    @GetMapping("export")
    @PreAuthorize(value = "hasAuthority('user:export')")
    public String export() {
        return "用户导出的操作";
    }
}
